import pygame
import spyral
import Dic

class Point(spyral.sprite.Sprite):
    def __init__(self, center):
        spyral.sprite.Sprite.__init__(self)
        
        self.layer = 3;
        self.radius = 10;
        self.max_radius = 50;
        
        self.image = spyral.util.new_surface(self.max_radius * 2, self.max_radius * 2)
        self.rect.center = center;
        self.drawCircle()

    def update(self, tick):
        self.image = self.image.copy()
        if (self.radius < self.max_radius):
            self.image.fill(0);
            self.radius += 2;
            self.drawCircle();
        else:
            self.kill()
    
    def drawCircle(self):
        pygame.draw.circle(self.image, Dic.colors['white'], (self.max_radius, self.max_radius), self.radius, 1);

